<template>
  <div class="product-detail">
    <h2>商品详情</h2>
    <p>商品 ID: {{ id }}</p>
    <!-- 添加实际详情内容 -->
    <el-button @click="$router.back()">返回</el-button>
  </div>
</template>

<script>
export default {
  computed: {
    id() {
      return this.$route.params.id;
    },
  },
};
</script>

<style scoped>
.product-detail {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}
</style>
